<?php
$this->breadcrumbs = array(
	'Members'=>array('index'),
	$model->name,
);

$this->menu = array(
	array('label'=>'Daftar Anggota', 'url'=>array('index')),
	array('label'=>'Tambah Anggota', 'url'=>array('create')),
	array('label'=>'Ubah Anggota', 'url'=>array('update', 'id'=>$model->_id)),
	array(
		'label'=>'Hapus Anggota',
		'url'=>'#',
		'linkOptions'=>array(
			'submit'=>array(
				'delete',
				'id'=>$model->_id
			),
			'confirm'=>'Anda yakin ingin menghapus data ini?'
		)
	),
	array(
		'label'=>'Tambah Gambar',
		'url'=>array('memberImage/create', 'memberId'=>$model->_id),
	),
	array(
		'label'=>'Tambah Tanggal (Tanggal Lahir/Masa Berlaku)',
		'url'=>array('memberDate/create', 'memberId'=>$model->_id),
	),
	array(
		'label'=>'Tambah Alamat (Rumah/Kantor)',
		'url'=>array('memberAddress/create', 'memberId'=>$model->_id),
	),
	array(
		'label'=>'Tambah Identitas (KTP/SIM)',
		'url'=>array('memberIdentity/create', 'memberId'=>$model->_id),
	),
	array(
		'label'=>'Tambah Peralatan (HT/RIG)',
		'url'=>array('memberEquipment/create', 'memberId'=>$model->_id),
	),
	array(
		'label'=>'Tambah Instant Messenger (YM/GTalk)',
		'url'=>array('memberIm/create', 'memberId'=>$model->_id),
	),
	array(
		'label'=>'Tambah Sinyalemen',
		'url'=>array('memberIndication/create', 'memberId'=>$model->_id),
	),
	array(
		'label'=>'Tambah Organisasi',
		'url'=>array('memberOrganization/create', 'memberId'=>$model->_id),
	),
	array(
		'label'=>'Tambah Telepon (Rumah/Kantor/HP)',
		'url'=>array('memberPhone/create', 'memberId'=>$model->_id),
	),
	array(
		'label'=>'Tambah Situs (Homepage/Blog/Facebook/Twitter)',
		'url'=>array('memberUrl/create', 'memberId'=>$model->_id),
	),
);
?>

<h1>View Member #<?php echo $model->_id; ?></h1>
<div class="byline"><?php echo CHtml::encode($model->name); ?></div>

<h2>Profil</h2>

<?php
$properties = array(
	'data'=>$model,
	'attributes'=>array(
		'name',
		'callSign',
		'code',
		'birthPlace',
		'reference',
	),
);
$this->widget('zii.widgets.CDetailView', $properties);
?>

<h2>Tanggal</h2>

<?php
$config = array('id'=>'memberDate', 'keyField'=>'_id');
$dataProvider = new CArrayDataProvider($model->dates, $config);
$properties = array(
	'dataProvider'=>$dataProvider,
	'itemView'=>'application.views.memberDate._view',
	'enablePagination'=>false,
	'pager'=>false,
	'summaryText'=>'',
	'id'=>'date-list',
);
$this->widget('zii.widgets.CListView', $properties);
?>

<h2>Telepon</h2>

<?php
$config = array('id'=>'memberPhone', 'keyField'=>'_id');
$dataProvider = new CArrayDataProvider($model->phones, $config);
$properties = array(
	'dataProvider'=>$dataProvider,
	'itemView'=>'application.views.memberPhone._view',
	'enablePagination'=>false,
	'pager'=>false,
	'summaryText'=>'',
	'id'=>'phone-list',
);
$this->widget('zii.widgets.CListView', $properties);
?>

<h2>Alamat</h2>

<?php
$config = array('id'=>'memberAddress', 'keyField'=>'_id');
$dataProvider = new CArrayDataProvider($model->addresses, $config);
$properties = array(
	'dataProvider'=>$dataProvider,
	'itemView'=>'application.views.memberAddress._view',
	'enablePagination'=>false,
	'pager'=>false,
	'summaryText'=>'',
	'id'=>'address-list',
);
$this->widget('zii.widgets.CListView', $properties);
?>

<h2>Gambar</h2>

<?php
$config = array('id'=>'memberImage', 'keyField'=>'_id');
$dataProvider = new CArrayDataProvider($model->images, $config);
$properties = array(
	'dataProvider'=>$dataProvider,
	'itemView'=>'application.views.memberImage._view',
	'enablePagination'=>false,
	'pager'=>false,
	'summaryText'=>'',
	'id'=>'image-list',
	'htmlOptions'=>array(
		'class'=>'gallery',
	),
);
$this->widget('zii.widgets.CListView', $properties);

$options = array(
	'slideshow'=>5000,
	'autoplay_slideshow'=>false,
	'show_title'=>false
);
EPrettyPhoto::add('.gallery a.image', EPrettyPhoto::PRETTY_GALLERY,
		EPrettyPhoto::THEME_DARK_ROUNDED, $options);
?>